
INCLUDEPATH = -I../../../include/processor/isamips_qemu
COBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
ASMOBJECTS = $(patsubst %.S, %.o, $(wildcard *.S))

all: $(COBJECTS) $(ASMOBJECTS)
	$(LD) -o processor.o -r $(COBJECTS) $(ASMOBJECTS)

%.o: %.S
	$(AS) -o $@ $^

%.o: %.c
	$(GCC) -c $(INCLUDEPATH) $^ -o $@

clean:
	-rm -rf ./*.o
	-rm -rf ./*~
	-rm -rf ../../../include/processor/isamips_qemu/*~
